home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / COMMS / C035.ZIP / SCREEN.H < prev    next >
Text File  |  1990-02-17  |  4KB  |  73 lines

  1. /****************************************************************************/
  2. /*   FILE SCREEN.H                                                          */
  3. /*   Created  11-JAN-1990               Richard B. Johnson                  */
  4. /*                                      405 Broughton Drive                 */
  5. /*                                      Beverly, Massachusetts 01915        */
  6. /*                                      BBS (508) 922-3166                  */
  7. /*                                                                          */
  8. /*                             JMODEM screen header                         */
  9. /*                                                                          */
  10. /****************************************************************************/
  11.  
  12. #define VIDEO 0x10                              /* Video BIOS interrupt */
  13. #define BNK  128  << 8                          /* Video attributes     */
  14. #define RD_BG 64  << 8
  15. #define GN_BG 32  << 8
  16. #define BL_BG 16  << 8
  17. #define HI_FG  8  << 8
  18. #define RD_FG  4  << 8
  19. #define GN_FG  2  << 8
  20. #define BL_FG  1  << 8
  21. #define BK_BG  7  << 8
  22. #define WH_FG  RD_FG|BL_FG|GN_FG
  23. #define boxes 4                                 /* Number of windows        */
  24. #define lines 6                                 /* Max lines of text in box */
  25.                         /* Function prototypes  */
  26. void get_curs(union REGS *);                    /* Get cursor position      */
  27. void kill_curs(union REGS *);                   /* Kill the cursor          */
  28. void restore_curs(union REGS *);                /* Restore the cursor       */
  29. void set_curs(short,short,union REGS *);        /* Set cursor position      */
  30. void set_char_atr(unsigned,union REGS *);       /* Set char and attribute   */
  31. void write_str(char*,unsigned,union REGS *);    /* write string/attr        */
  32. unsigned get_char_atr(union REGS *);            /* Get char and attribute   */
  33. short end_box(short,short*,short**,union REGS *); /* Restore window        */
  34. short set_box ( short   ,                       /* Set window function      */
  35.                 unsigned short,
  36.                 short   ,
  37.                 short   ,
  38.                 short   ,
  39.                 short   ,
  40.                 short * ,
  41.                 short **,
  42.                 union REGS *);
  43.  
  44. short box_loc[] = {                             /* Coordinates of the boxes */
  45. /* start   start   end    end
  46.    row     col     row    col */
  47.    5    ,  4    ,  13   , 34    ,       /* Box 0        */
  48.    9    ,  12   ,  14   , 72    ,       /* Box 1        */
  49.    12   ,  25   ,  20   , 52    ,       /* Box 2        */
  50.    };
  51.  
  52. typedef struct {
  53.             unsigned short win;
  54.             unsigned short txt;
  55.                 } ATTRIB;
  56.  
  57. ATTRIB attribute[]= {                   /* Attributes for each box      */
  58.     {
  59.     GN_BG|RD_FG|HI_FG,                  /* GRN/WHT Border (box 0)       */
  60.     GN_BG|WH_FG|HI_FG                   /* GRN/RED Text                 */
  61.     },
  62.     {
  63.     BL_BG|WH_FG|HI_FG,                  /* BLU/WHT Border (box 1)        */
  64.     BL_BG|RD_FG|GN_FG|HI_FG             /* BLU/YEL Text                  */
  65.     },
  66.     {
  67.     BL_BG|GN_BG|RD_FG|HI_FG,            /* RED/CYN Border (box 2)         */
  68.     BL_BG|GN_BG|RD_FG|GN_FG|HI_FG       /* YEL/CYN Text                   */
  69.     }
  70.     };
  71. /****************************************************************************/
  72. /***********************  E N D  O F  M O D U L E  **************************/
  73.